<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateApppageRectplDatasTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apppage_rectpl_datas', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 191)->nullable()->comment('推荐数据名称');
            $table->string('title', 191)->nullable()->comment('推荐标题');
            $table->string('subtitle', 191)->nullable()->comment('推荐副标题');
            $table->integer('apppage_id')->default(0)->nullable()->unsigned()->comment('页面ID');
            $table->integer('paneltpl_id')->default(0)->unsigned()->comment('模板编号');
            $table->string('area', 100)->comment('区位编号');
            $table->integer('data_id')->default(0)->unsigned()->comment('数据类型ID');
            $table->integer('resource_data_id')->default(0)->unsigned()->comment('数据ID');
            $table->string('onclick')->nullable()->comment('点击动作');
            $table->string('tags')->nullable()->comment('推荐标签');
            $table->string('img', 191)->nullable()->comment('推荐图');
            $table->integer('order')->default(0)->unsigned()->comment('排序');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apppage_rectpl_datas');
    }
}
